package com.itdachang.design.behavioral.state;

/**
 * 环境类
 * @author gcq
 * @Create 2022-02-14
 */
public class SKTTeam {

    private TeamState teamState;

    public void setTeamState(TeamState teamState) {
        this.teamState = teamState;
    }

    /**
     * 开始游戏
     */
    public void startGame() {
        // 状态不同导致不同的游戏结果
        teamState.playGame();
    }

    /**
     * 指向下一个状态
     */
    public void next() {
        teamState = teamState.next();
    }
}